Conway Venn Diagram (drewconway.com).
Source: Harvard Business Review.
Vitrivian triangle (venustas, firmitas, utilitas)
r4h2o.Rprojhttps://github.com/pprevos/r4h2o/+ - * ^ %% %/%)<- versus =)sum(), prod(), abs(), log(a, base = b))
= sign## [1] -13
x <- -10:10
y <- -x^2 -2 * x + 30
plot(x, y, type = "l", col = "blue", main = "Parabola")
abline(h = 0, col = "grey", lty = 2)
abline(v = 0, col = "grey", lty = 2)First computer bug (1947)
_ or . or camelCase\[Q = \frac{2}{3} C_d \sqrt{2g} \; lh^\frac{3}{2}\]
Create an R script and answer:
\(Q = \frac{2}{3} C_d \sqrt{2g} \; lh^\frac{3}{2}\)
library(dplyr)dplyr::filter()readr package for CSV files (part of Tidyverse)
read_csv() faster alternative for read.csv()"abcd")"2022-02-02")"Male", "Female", "Other")TRUE, FALSE)Scalar, vector and data frame / tibble (matrix)
df[rows, columns]df$columnglimpse(df)gormsey[12:13, ]
gormsey[, 4:5]
gormsey[1:2, c(2, 4:5, 6)]
gormsey[1:2, c(-1, -3, -7)]
gormsey$Date[1:6]What is the sample number of the last sample in the Gormsey data?
Hint, use the nrow() function.
Compare variables
## [1] 2422
## [1] "Chlorine Total" "E. coli" "Turbidity" "THM"
##
## Chlorine Total E. coli THM Turbidity
## 760 760 168 734
## # A tibble: 4 × 2
## Measure n
## <chr> <int>
## 1 Chlorine Total 760
## 2 E. coli 760
## 3 THM 168
## 4 Turbidity 734
Write a script to answer these questions:
turbidity <- filter(gormsey, Measure == "Turbidity")
mean(turbidity$Result)
sum(turbidity$Result) / length(turbidity$Result)
median(turbidity$Result)
which.max(table(round(turbidity$Result, 1)))Calculating the mode of continuous data is complex and requires a specialised package.